<template>
    <div class="me" style="height: 100%; background: #f2f2f2">
        <div class="user">
            <ul class="user-list">
                <li class="user-list-header">
                    <div>
                        <img src="../assets/images/personal_mayi_default@2x.png" alt=""/>
                    </div>
                    <span class="user-name">
                    {{phone}}
                </span>
                </li>
                <li class="baogao borBttom">
                    <router-link to="/mian/report">我的报告 <i> <img src="../assets/images/personal_collect_icon@2x.png" alt=""/></i></router-link>
                </li>
                <li class="baogao borBttom">
                    <a href="http://api.mayinvwang.com/webview/advertising">关于我们 <i> <img src="../assets/images/personal_collect_icon@2x.png" alt=""/></i></a>
                </li>
            </ul>
        </div>
        <!--退出按钮-->
        <div class="btn-login">
            <button @click="tuilogin" >
                退出登录
            </button>
        </div>
    </div>
</template>

<script>
    export default {
        name: 'me',
        data(me) {
            return {
                phone: ''
            }
        },
        created(){
            var a =sessionStorage["phone"].substr(0,3);
            var b =sessionStorage["phone"].substr(7,4);
            this.phone=a+'****'+b;
        },
        methods:{
            tuilogin(){
                this.$router.push({path:'/',query:{token:sessionStorage['token']}})
                sessionStorage.clear();
            }
        }
    }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  @import '../assets/css/user.css';
</style>
